#ifndef DEF_LINE
#define DEF_LINE

#ifdef WIN32
#include <GL/glew.h>
#else
#define GL3_PROTOTYPES 1
#include <GL3/gl3.h>
#endif

#include <vector>

#include "../Constantes.h"
#include "../Shaders/Shader.h"
#include "../Maths/Matrice.h"
#include "../Object3D.h"

class Line
{
public :
	Line();
	Line(float* vertex, int nbPoints);
	~Line();

	void draw(Matrice &modelview, Matrice &projection);
	void drawPoints(Matrice &modelview, Matrice &projection);

	//Extrusion
	Object3D* simpleExtrusion(int iteration, float distance, float xAxis, float yAxis, float zAxis);
	Object3D* revolutionExtrusion(int iteration, float xPoint, float yPoint, float zPoint, int xAxis, int yAxis, int zAxis);
	Object3D* lineFollowExtrusion(Line* guide);


protected :
	//Extrusions tools	
	float* getMiddlePoint();
	bool isLineClose(float* vertex, int nbPoints);


protected :
	Shader m_shaderColor;
	float *m_vertex;
	int m_nbPoints;
	bool m_lineClose;


};
#endif